import request from '@/utils/request.js'

export function getAllChannels (data) {
  return request({
    url: '/v1_0/channels',
    method: 'get'
  })
}

export function addChannel (channel) {
  return request({
    url: '/v1_0/user/channels',
    method: 'PATCH',
    data: {
      channels: [channel]
    }
  })
}

export function deleteChannelById (id) {
  return request({
    url: '/v1_0/user/channels/' + id,
    method: 'DELETE'
  })
}
